﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BusinessLayer;

namespace PresentationLayer
{
    public partial class ActuPrecoPeca : Form
    {
        public ActuPrecoPeca()
        {
            InitializeComponent();
        }

        private void Altera_Click(object sender, EventArgs e)
        {
            this.textRefPeca.SelectAll();
            this.textPreco.SelectAll();

            if (this.textRefPeca.SelectedText != "" && this.textPreco.SelectedText != "") {
                if (PecaActions.AlteraPrecoPeca(this.textRefPeca.SelectedText, this.textPreco.SelectedText))
                    this.Close();
            }
        }

       
    }
}
